Learn R Programming

cacIRT (version 1.3)

Useful IRT Functions: A collection of useful IRT functions.

Description

Most are modified from the package irtoys.

Usage

iif(ip, x, D = 1.7)
irf(ip, x, D = 1.7)
MLE(resp, ip, D = 1.7)
normal.qu(n = 15, lower = -4, upper = 4, mu = 0, sigma = 1)
SEM(ip, x, D = 1.7)
sim(ip, x, D = 1.7)
tif(ip, x, D = 1.7)

Arguments

ip
A Jx3 matrix of item parameters. Columns are discrimination, difficulty, and guessing
x
Vector of theta points
resp
Response data matrix, subjects by items
n
Number of quadrature points wanted
lower, upper
Range of points wanted
mu, sigma
The normal distribution from which points and weights are taken
D
The scaling constant for the IRT parameters, defaults to 1.7, alternatively often set to 1.

Details

iif give item information, irf gives item response function, MLE returns maximum likelihood estimates of theta (perfect scores get +-4), normal.qu returns a list length 2 of quadrature points and weights, SEM gives the inverse of the test information, sim returns simulated response matrix, tif gives the test information function.

References

see R package irtoys for further details

Examples

Run this code
params<-matrix(c(1,1,1,1,-2,1,0,1,0,0,0,0),4,3)
rdm<-sim(params, rnorm(100))

theta.hat <- MLE(rdm, params)
theta.se  <- SEM(rdm, params)

## transform a cut score of theta = 0 to the expected true score scale

	t.cut <- 0
	x.cut <- sum(irf(params, t.cut)$f)

Run the code above in your browser using DataLab